//
//  UserModel.m
//  MVVM
//
//  Created by Apple on 2018/6/5.
//  Copyright © 2018年 TechnologyLtdhuayu. All rights reserved.
//

#import "UserModel.h"
#import "User.h"


@implementation UserModel

- (id)init
{
    self = [super init];
    if (self) {
        _user = [[User alloc]init];
        if (_user.userName.length > 0 || _user.userSex.length > 0) {
            _userName = _user.userName;
            _userSex = _user.userSex;
        }
        else {
            _userName = [NSString stringWithFormat:@"简书：%ldld",(long)_user.userID];
        }
    }
    return self;
}

@end
